<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class HRAdmin extends CI_Controller {
 	public function __construct()
    {
        parent::__construct();
        session_start();
        //$this->output->enable_profiler(FALSE);
    	if (!isset($_SESSION['uid']) || $_SESSION['uid'] < 1){
	    	redirect('memberlogin/requiredmessage','refresh');
	    }
	    elseif ($_SESSION['role_id'] !=1){
    		redirect('memberlogin/restriction','refresh');
	    }
	    $data['menus'] = 'menus';
		$this->load->vars($data);
    }
	    
	public function index()
	{
		$data['title'] = "Dashboard - Friends-International Organization";
		$data['main'] = 'hr/dashboard';
		$this->load->vars($data);
		$this->load->view('template'); 
	}
	
	public function staffprofile()
	{
		$data['title'] = "Staff profile - Friends-International Organization";
		$data['main'] = 'hr/staffprofile';
		$this->load->vars($data);
		$this->load->view('template'); 
	}
	public function payroll()
	{
		$data['title'] = "Payroll - Friends-International Organization";
		$data['main'] = 'hr/payroll';
		$this->load->vars($data);
		$this->load->view('template'); 
	}
	public function training()
	{
		$data['title'] = "Training - Friends-International Organization";
		$data['main'] = 'hr/training';
		$this->load->vars($data);
		$this->load->view('template'); 
	}
	public function report()
	{
		$data['title'] = "Report - Friends-International Organization";
		$data['main'] = 'hr/report';
		$this->load->vars($data);
		$this->load->view('template'); 
	}
	public function setting()
	{
		$data['title'] = "Setting - Friends-International Organization";
		$data['main'] = 'setting/setting';
		$this->load->vars($data);
		$this->load->view('template'); 
	}
}
